package com.wish;

/**
 * @Author: suliucheng
 * @Time: 2021/5/30 003010:24
 * @Description: 静态代码块的方式实现饿汉式加载单例
 */
public class Demo02Singleton {

    private Demo02Singleton(){
    }
    private static Demo02Singleton instance;
    static {
        instance = new Demo02Singleton();
    }
    public static Demo02Singleton getInstance(){
        return instance;
    }

}
